#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;

const int N = 1e6 + 10;

bool st[N];
int prime[N];
int cnt;

void init(){
    st[1] = true;
    for(int i = 2; i < N; i ++){
        if(!st[i]) prime[cnt ++] = i;

        for(int j = 0; prime[j] <= N / i; j ++){
            st[i * prime[j]] = true;
            if(i % prime[j] == 0) break;
        }
    }
}

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);

    int n;

    init();
    while(scanf("%d", &n), n){
        for(int i = 0; i < cnt; i ++){
            if(!st[n - prime[i]]){
                printf("%d = %d + %d\n", n, prime[i], n - prime[i]);
                break;
            }
        }
    }

    return 0;
}